/**
*  \file battery_cfg.h
*
*  \brief
*
*  \author yingqin.wu  <yingqin.wu@linde-china.com>
*
*  all the param of cells or battery should be here and the same with datasheet of cell
*  and system specification.
*
*/

#ifndef battery_CFG_H_INCLUDED
#define battery_CFG_H_INCLUDED

/*================================================[ public includes  ]================================================*/
#include "../cfg/prj.h"

/*================================================[ public defines   ]================================================*/


#define E_LISHEN_CELL (1)




#ifdef E_LISHEN_CELL
	#define AMPHOUR (U32_CONST(3600)* U32_CONST(1000))			/**<coefficient to change unit from Ah to mAs*/
	#define NOMINAL_CELL_AH		76								/**< nominal capacity of cell with unit Ah */
	#define NOMINAL_CAPACITY_CELL NOMINAL_CELL_AH*AMPHOUR     	/*104E CE00*/  /**<coefficient to change unit from Ah to mAs*/
	#define MAX_CELL_VOLTAGE  U16_CONST(3650)
	#define MIN_CELL_VOLTAGE  U16_CONST(2000)
	#define MAX_DISCHARGE_CURRENT30s       S32_CONST(NOMINAL_CELL_AH*2000)		/**< 2C discharge, unit: mA*/
	#define MAX_CHARGE_CURRENT30s          S32_CONST(NOMINAL_CELL_AH*1000)		 /**< 1C charing, unit: mA*/
	#define MAX_CHARGE_CURRENT             S32_CONST(NOMINAL_CELL_AH*500)  		 /**< 0.5C charing, unit: mA*/
	#define MAX_WORKING_TEMP 	S16_CONST(55*100)
	#define MIN_CHARING_TEMP	S16_CONST(0)
	#define MIN_DISCHARGE_TEMP	S16_CONST(-30*100)
	#define NUMBER_CELL_IN_SERIES  	U8_CONST(8)
#else
	#define AMPHOUR (U32_CONST(3600)* U32_CONST(1000))
	#define NOMINAL_CAPACITY 360*AMPHOUR     /*4D3F6400*/	/*Battery*/
	#define MAX_CELL_VOLTAGE  U16_CONST(3650)
	#define MIN_CELL_VOLTAGE  U16_CONST(3000)
	#define MAX_MODULE_VOLTAGE U16_CONST(3650)<<4
	#define MIN_MODULE_VOLTAGE U16_CONST(3000)<<4
	#define MAX_DISCHARGE_CURRENT2min      S32_CONST(-120000)
	#define MAX_DISCHARGE_CURRENT1s        S32_CONST(-300000)
	#define RECOVERY_DISCHARGE_CURRENT     S32_CONST(-60000)
	#define MAX_CHARGE_CURRENT1min         S32_CONST(60000)
	#define MAX_CHARGE_CURRENT             S32_CONST(30000)
	#define RECOVERY_CHARGE_CURRENT        S32_CONST(15000)
	#define MAX_CHARGE_VOLTAGE             U16_CONST(29200)
	#define MIN_DISCHARGE_VOLTAGE          U16_CONST(20000)
#endif
/*================================================[ public datatypes ]================================================*/


/*================================================[ public variables ]================================================*/

/*================================================[ inline functions ]================================================*/


/*================================================[ public functions ]================================================*/

/*====================================================================================================================*/

#endif

/***********************************************************************************************************************
*                             Copyright 2018 Linde Material Handling. All rights reserved.                             *
***********************************************************************************************************************/
